#include "compte.h"
#include <iostream>
using namespace std;
 
Compte::Compte(){}
Compte::Compte(long num ,double solde)
{
 this->num = num ;
 this->solde = solde ;
}

long Compte::getnum() const
{
 return num ;
}
void Compte::setnum(long num)
{
  this-> num = num ;
}
double Compte::getSolde() const
{
 return solde ;
}
void Compte::setSolde(double solde)
{
  this-> solde = solde ;
}
void Compte::afficher() const
{
  cout<<"numero de compte"<<num<<endl ;
  cout<<"solde est"<<solde<<endl ;
}
void Compte::ajouter(double sum)
{
 solde += sum ;
}
bool Compte::retirer(double sum)
{ if (sum <= solde)
   {   solde=solde-sum ;
       return true ;
   }
     return false ;
}
Compte::~Compte(){}

